/**
 * 
 */
package com.wubo.common.jdbc;

import org.apache.commons.dbcp.BasicDataSource;

/**
 * @author WuBo
 * @CreateDate 2012-4-12 上午11:31:03
 */
public class SQLExecutorFactory {

	public static SQLExecutor createSqlExecutor(DBConfig dbConfig){
		BasicDataSource ds = new BasicDataSource();
		ds.setDriverClassName(dbConfig.getDriver());
		ds.setUrl(dbConfig.getUrl());
		ds.setUsername(dbConfig.getUsername());
		ds.setPassword(dbConfig.getPassword());
		return new SQLExecutor(ds);
	}
}
